---
layout: default
nav: index
permalink: /cn/
lang: cn
---
{% assign translation = site.data[page.lang] %}
{% for post in site.posts %}
{% if post.lastdate %}{% capture pdate %}<span class="text-muted">{{ post.lastdate | date:"%Y-%m-%d" }}</span>{% endcapture %}{% capture pauthor %}<a class="text-muted" href="#">{{ site.author }}</a>{% endcapture %}{% else %}{% capture pdate %}<span class="text-muted">{{ post.date | date:"%Y-%m-%d" }}</span>{% endcapture %}{% capture pauthor %}<a class="text-muted" href="#">{{ site.author }}</a>{% endcapture %}{% endif %}
{% if post.lang contains 'cn' %}{% if post.stickie == true %}
<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title"><a href="{{ post.url }}"><span class="label label-primary">{{ translation.top }}</span>{{ post.title }}</a></h3>
    </div>
    <div class="panel-body">
        {{ post.excerpt | strip_html }}
        <p><a href="{{ post.url }}">{{ translation.readmore }}</a></p>
    </div>
    <div class="panel-footer">
            {% if post.lastdate %}{{ translation.postupdate | replace: 'author', pauthor | replace: 'date', pdate }}{% else %}{{ translation.postinfo | replace: 'author', pauthor | replace: 'date', pdate }}{% endif %}
	  <p><span class="glyphicon glyphicon-bookmark"></span> <a href="/{{ page.lang }}/categories/#aa{{ post.categories }}"><span class="label label-primary">{{ post.categories }}</span></a></p>
	  <p><span class="glyphicon glyphicon-tags"></span> {% for tag in post.tags %}<a href="/{{ page.lang }}/tags/#aa{{ tag }}"><span class="label label-primary">{{ tag }}</span></a> {% endfor %}</p>
    </div>
</div>
{% endif %}
{% endif %}
{% endfor %}
{% for post in site.posts %}
{% if post.lastdate %}{% capture pdate %}<span class="text-muted">{{ post.lastdate | date:"%Y-%m-%d" }}</span>{% endcapture %}{% capture pauthor %}<a class="text-muted" href="#">{{ site.author }}</a>{% endcapture %}{% else %}{% capture pdate %}<span class="text-muted">{{ post.date | date:"%Y-%m-%d" }}</span>{% endcapture %}{% capture pauthor %}<a class="text-muted" href="#">{{ site.author }}</a>{% endcapture %}{% endif %}
{% if post.lang contains 'cn' %}
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title"><a href="{{ post.url }}">{{ post.title }}</a></h3>
    </div>
    <div class="panel-body">
        {{ post.excerpt | strip_html }}
        <p><a href="{{ post.url }}">{{ translation.readmore }}</a></p>
    </div>
    <div class="panel-footer">
            {% if post.lastdate %}{{ translation.postupdate | replace: 'author', pauthor | replace: 'date', pdate }}{% else %}{{ translation.postinfo | replace: 'author', pauthor | replace: 'date', pdate }}{% endif %}
	  <p><span class="glyphicon glyphicon-bookmark"></span> <a href="/{{ page.lang }}/categories/#aa{{ post.categories }}"><span class="label label-default">{{ post.categories }}</span></a></p>
	  <p><span class="glyphicon glyphicon-tags"></span> {% for tag in post.tags %}<a href="/{{ page.lang }}/tags/#aa{{ tag }}"><span class="label label-default">{{ tag }}</span></a> {% endfor %}</p>
    </div>
</div>
{% endif %}
{% endfor %}
